package com.googlecode.revanta.main.view;

import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import com.googlecode.revanta.main.controller.MainController;

public class MainJFrameListener implements WindowListener, ChangeListener{

	MainController controller = null;
	
	public MainJFrameListener(MainController controller) {
		this.controller = controller;
	}
	
	@Override
	public void windowActivated(WindowEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void windowClosed(WindowEvent e) { 
	}

	@Override
	public void windowClosing(WindowEvent e) {
		controller.exitApp();
	}

	@Override
	public void windowDeactivated(WindowEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void windowDeiconified(WindowEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void windowIconified(WindowEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void windowOpened(WindowEvent e) {
		// TODO Auto-generated method stub
		
	}
	
	@Override
	// colocar listener em MainJFrameListener
	public void stateChanged(ChangeEvent e) {
		
	}

}